{#**
*
* 功能描述（修改密码模板）
*
* @author suoya <jlusuoya@gmail.com>
* @version 1
*#}

{#include file="header.tpl" title="密码" menuIdx=2 headImg="user" #}
<div class="block box">
    <div id="ur_here">
        当前位置: <a href=".">首页</a> <code>/</code> 用户中心 <code>/</code> 找回/修改密码 </div>
</div>
<script type="text/javascript">
    var user_name_empty = "请输入您的用户名！";
    var email_address_empty = "请输入您的电子邮件地址！";
    var email_address_error = "您输入的电子邮件地址格式不正确！";
    var new_password_empty = "请输入您的新密码！";
    var confirm_password_empty = "请输入您的确认密码！";
    var both_password_error = "您两次输入的密码不一致！";
	var old_password_empty = "请输入原密码";
</script>
<div class="usBox">
    <div class="usBox_2 clearfix">
        <div style="height: 200px;">
            <div style="float: left; padding-top: 10px; width: 150px;">
                <select id="findPwd_type">
                    <option selected="selected" value="mobile">通过手机重置密码：</option>
                    <option value="mail">通过邮件重置密码：</option>
                </select>
            </div>
            <div id="pwd_type_mobile" style="float: left; display: block;">
                <form action="index.php?action=system.chpwdbymsg" method="post" name="getPasswordByMobile" onsubmit="return checkMobileCaptcha()">
                    <table width="100%" border="0" cellpadding="0" align="center">
                        <tr height="40">
                            <td width="120" align="right" class="input_label">手机号码：</td>
                            <td width="250">
                                <input name="mobile" id="mobile" type="text" size="25" class="inputBg1" />
                            </td>
                            <td></td>
                        </tr>
                        <tr height="40">
                            <td align="right" class="input_label">短信验证码：</td>
                            <td>
                                <input name="authcode" id="mobile_captcha" type="text" size="25" class="inputBg1" />
                            </td>
                            <td></td>
                        </tr>
                        <tr height="40">
                            <td align="right" class="f9">&nbsp;</td>
                            <td align="left">
                                <input type="button" id='captcha_notice' value="获取短信验证码" class="button_nomarl" onclick="getMobileCaptcha();" />
                                <input type="submit" name="submit" value="找回密码" class="button_nomarl"/>
                            </td>
                            <td></td>
                        </tr>
                    </table>
                </form>
            </div>
            <div id="pwd_type_mail" style="float: left; display: none;">
                <form action="index.php?action=system.SendPwdMail" method="post" name="getPassword" onsubmit="return submitPwdInfo();">
                    <table width="100%" border="0" cellpadding="0" align="center">
                        <tr height="40">
                            <td width="120" align="right" class="input_label">用户名：</td>
                            <td width="250">
                                <input name="user_name" type="text" size="25" class="inputBg1" />
                            </td>
                            <td></td>
                        </tr>
                        <tr height="40">
                            <td align="right" class="input_label">验证码：</td>
                            <td>
                                <input name="authcode" type="text" size="25" class="inputBg1" />
                            </td>
                            <td>
                                <img src="authcode.php?" alt="captcha" style="vertical-align: middle;cursor: pointer;" onClick="this.src = 'authcode.php?' + Math.random()" />
                            </td>
                        </tr>
                        <tr height="40">
                            <td align="right" class="input_label">电子邮件：</td>
                            <td><input name="email" type="text" size="25" class="inputBg1" />
                            </td>
                            <td>
                                <input type="submit" name="submit" value="找回密码" class="button_nomarl" />
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
		{#if $username|default:false #}
        <div style="display: inline-block;">
            <div style="float: left; padding-top: 10px; width: 150px; color: #F26522;">
                    修改密码：
            </div>
            <div style="float: left;">
            <form name="formPassword" action="index.php?action=user.chpwd" method="post" onSubmit="if(editPassword()) ajax_commit(this); return false" >
                <table width="100%" border="0" cellpadding="0" cellspacing="0" >
                    <tr height="40">
                        <td width="120" align="right" class="input_label">原密码：</td>
                        <td ><input name="old_password" type="password" size="25"  class="inputBg1" /></td>
                        <td></td>
                    </tr>
                    <tr height="40">
                        <td width="60" align="right" class="input_label">新密码：</td>
                        <td ><input name="new_password" type="password" size="25"  class="inputBg1" /></td>
                        <td></td>
                    </tr>
                    <tr height="40">
                        <td width="60" align="right" class="input_label">确认密码：</td>
                        <td width="250">
                            <input name="comfirm_password" type="password" size="25"  class="inputBg1" />
                            <input name="act" type="hidden" value="act_edit_password" />
                        </td>
                        <td>
                            <input name="submit" type="submit" class="button_nomarl" value="确认修改" />
                        </td>
                    </tr>
                </table>
            </form>
            </div>
        </div>
		{#/if#}
    </div>
</div>
<script type="text/javascript">
    $("#findPwd_type").change(function() {
        if ("mail" == $(this).select().val()) {
            $("#pwd_type_mobile").hide();
            $("#pwd_type_mail").show();
        } else {
            $("#pwd_type_mail").hide();
            $("#pwd_type_mobile").show();
        }
    });
    var process_request = "正在处理您的请求...";
    var username_empty = "用户名不能为空。";
    var username_shorter = "用户名不能少于3个字符";
    var username_invalid = "用户名只能是由字母数字以及下划线组成";
    var password_empty = "登录密码不能为空";
    var password_shorter = "密码不能少于6个字符";
    var confirm_password_invalid = "两次输入密码不一致";
    var email_empty = "Email 为空";
    var email_invalid = "Email 不是合法的地址";
    var agreement = "您没有接受协议";
    var msn_invalid = "msn地址不是一个有效的邮件地址";
    var qq_invalid = "QQ号码不是一个有效的号码";
    var home_phone_invalid = "家庭电话不是一个有效号码";
    var office_phone_invalid = "办公电话不是一个有效号码";
    var mobile_phone_invalid = "手机号码不是一个有效号码";
    var msg_un_blank = "用户名不能为空";
    var msg_un_length = "用户名不得超过7个汉字";
    var msg_un_format = "用户名含有非法字符";
    var msg_un_registered = "用户名已经存在,请重新输入";
    var msg_can_rg = "可以注册";
    var msg_email_blank = "邮件地址不能为空";
    var msg_email_registered = "邮箱已存在,请重新输入";
    var msg_email_format = "邮件地址不合法";
    var msg_blank = "不能为空";
    var no_select_question = "您没有完成密码提示问题的操作";
    var passwd_balnk = "密码中不能包含空格";
    var msg_mobile_blank = " 请输入手机号";
    var username_exist = "用户名 %s 已经存在";
</script>
{#include file="footer.tpl"#}
